#pragma once

#include "Common.h"
#include "ZobristHashes.h"


#define VALUE_KILLER_1		100000
#define VALUE_KILLER_2		99999

void InitKillers(SEngineData *ed);
void SetKiller(SEngineData *ed, ZOBRIST_KEY keyMove, int ply);

template<typename BB> void UpdateKillerScore(SEngineData *ed, BB* pbbMove, int count, bool bWhite, int ply)
{
	if(ed->bUseKillerMoves == false)
		return;

	for(int i = 0; i < count; i++)
	{
		BB* pMove = pbbMove + i;
		ZOBRIST_KEY  key = GenerateZobristHash<BB>(pMove, bWhite);
		if(ed->keyKillers[ply][0] ==  key)
			pMove->score += VALUE_KILLER_1;
		if(ed->keyKillers[ply][1] ==  key)
			pMove->score += VALUE_KILLER_2;
	}
}

